
/***********************************************************************
 * Move class
 * 
 * Implements the 'move' command
 *
 * Signature:
 *  public static Move create ();
 *  public String name ();
 *  public boolean execute (String[] arguments);
 ***********************************************************************/

public class Move extends Command {

    protected Move () {
	super("move");
    }

    public static Move create () {
	return new Move();
    }

    public boolean execute (String[] args) {
	if (args.length>2) {
	    SpaceGame.me().move(Integer.parseInt(args[1]),
				Integer.parseInt(args[2]));
	    return true;
	}
	System.out.println("Need arguments dx and dy");
	return false;
    }

}